cmd/internal/objfile: only consider executable segments for load address
Reportedly on some new Fedora systems the linker is producing extra
load segments, basically making the dynamic section non-executable.
We were assuming that the first load segment could be used to
determine the program's load offset, but that is no longer true.
Use the first executable load segment instead.
Fixes #26369
Change-Id: I5ee31ddeef2e8caeed3112edc5149065a6448456
Reviewed-on: https://go-review.googlesource.com/127895
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Gbp-Pq: Name only-consider-executable-segments.patch
* Install the 'misc' and 'api' directories as part of the golang-1.10-src
package as some tools (vgo, go tool trace) expect them to be there.
(Closes: 894992¸ LP: #1743598)
* New upstream version 1.10.2.
- d/patches/0003-Backport_nopie_fix.patch: removed, now included upstream.
James Cowgill [Wed, 28 Feb 2018 16:10:14 +0000 (16:10 +0000)]
cmd/internal/obj/mips: load/store even float registers first
There is a bug in Octeon III processors where storing an odd floating
point register after it has recently been written to by a double
floating point operation will store the old value from before the double
operation (there are some extra details - the operation and store
must be a certain number of cycles apart). However, this bug does not
occur if the even register is stored first. Currently the bug only
happens on big endian because go always loads the even register first on
little endian.
Workaround the bug by always loading / storing the even floating point
register first. Since this is just an instruction reordering, it should
have no performance penalty. This follows other compilers like GCC which
will always store the even register first (although you do have to set
the ISA level to MIPS I to prevent it from using SDC1).
Change-Id: I5e73daa4d724ca1df7bf5228aab19f53f26a4976
Reviewed-on: https://go-review.googlesource.com/97735 Reviewed-by: Keith Randall <khr@golang.org>
Gbp-Pq: Name 0004-Backport_mips_octeon3_fp_fix.patch
cmd/link: do not pass -no-pie to host linker when -linkshared is passed
As the comment above the code I'm changing says, when building with
-buildmode=exe, the default compiler flags produce code incompatible with PIE.
But when -linkshared is passed, the default compiler flags are not used so this
does not apply. And now I've found a system (linux/arm64 with glibc 2.27) where
this combination of flags causes a problem, albeit for reasons I don't really
understand, so stop passing -no-pie when -linkshared is passed.
Change-Id: I412ec7941dc0cb89e6d1b171fc29288aadcb9f20
Reviewed-on: https://go-review.googlesource.com/104815
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Gbp-Pq: Name 0003-Backport_nopie_fix.patch
Martín Ferrari [Sun, 22 Apr 2018 21:21:05 +0000 (22:21 +0100)]
golang-1.10 (1.10.1-3) unstable; urgency=high
* Team upload.
[ Michael Hudson-Doyle ]
* Install the 'misc' and 'api' directories as part of the golang-1.10-src
package as some tools (vgo, go tool trace) expect them to be there.
(Closes: 894992¸ LP: #1743598)
[ Martín Ferrari ]
* Backport fix for FP bug in mips/Octeon III. Closes: #892088. Raising
severity.
* New upstream version, fixing CVE-2018-6574.
* d/patches/0001-os-signal-skip-TestTerminalSignal-if-posix_openpt-fa.patch,
d/patches/0003-cmd-vendor-github.com-google-pprof-cherry-pick-fix-t.patch,
d/patches/0004-cmd-link-internal-loadelf-fix-logic-for-computing-EL.patch:
removed, now included upstream.